#  This material contains proprietary software of Entropic Speech, Inc.  
#  Any reproduction, distribution, or publication without the the prior   
#  written permission of Entropic Speech, Inc. is strictly prohibited.
#  Any public distribution of copies of this work authorized in writing by
#  Entropic Speech, Inc. must bear the notice:
#
#      "Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved"
#
#  @(#)Makefile	1.2	11/25/87 ESI

CFLAGS = -g $(PROGCFLAGS)

OBJS = decode.o getbits.o history.o reconst.o

SRCS = decode.c getbits.c history.c reconst.c

decode: $(OBJS) $(SPSLIB)
	cc $(CFLAGS) $(OBJS) $(SPSLIB) -lm -o decode

decode.o:	$(SINC)/esps.h $(SINC)/anafea.h $(SINCL)/encode.h $(SINC)/fea.h $(SINCL)/fea2kb.h $(SINCL)/feahuff.h $(SINCL)/feaqhist.h $(SINCL)/feaquant.h
getbits.o:	$(SINC)/esps.h $(SINC)/fea.h $(SINCL)/fea2kb.h
history.o:	$(SINC)/esps.h $(SINC)/anafea.h $(SINCL)/encode.h $(SINC)/fea.h $(SINCL)/feaqhist.h
reconst.o:	$(SINC)/esps.h $(SINC)/anafea.h $(SINCL)/encode.h $(SINC)/fea.h $(SINCL)/fea2kb.h $(SINCL)/feaqhist.h $(SINCL)/feaquant.h

install: decode
	-strip decode
	-mv -f $(BINDIR)/decode $(OLDBIN)/decode
	-chmod $(PROGMOD) $(OLDBIN)/decode
	mv decode $(BINDIR)/decode
	chmod $(PROGMOD) $(BINDIR)/decode
	-diffmk $(MANDIR)/man1/decode.1 decode.1 man.diff
	@echo diffmked man page left in man.diff
	cp decode.1 $(MANDIR)/man1/decode.1
	chmod $(MANMOD) $(MANDIR)/man1/decode.1

clean:	
	rm -f $(OBJS) decode 
	
lint:	$(SRCS)
	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIB) -lm > lint
